feat: localization of core/exchange - #1638
Merged
ethicnology merged 1 commit intoDec 8, 2025
Merged
Conversation
gluneau
marked this pull request as draft
December 8, 2025 17:10
Member
- Add toTranslated() method to BuyError, SellError, PayError, WithdrawError - Add 12 new ARB keys for buy and withdraw error messages - Update UI screens to use error.toTranslated(context) instead of switch expressions - Simplify _SellError and _PayError widgets to use centralized error translation - Remove redundant error type pattern matching in favor of toTranslated() - Languages: English, French, Spanish
gluneau
force-pushed
the
localization/core-exchange
branch
from
December 8, 2025 17:17
39521d6 to
66e12e2
Compare
gluneau
marked this pull request as ready for review
December 8, 2025 17:21
ethicnology
self-requested a review
December 8, 2025 17:24
Contributor
Author
|
Yeah, I like it when it removes more lines than it creates |
Member
|
@gluneau agreed 🤟 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Localization: core/exchange
Overview
lib/core/exchange/domain/errors/localization/core-exchangeChanges
toTranslated(BuildContext context)method to all 4 error classesImplementation Pattern
Following the same toTranslated() method pattern as BitBoxError:
toTranslated(BuildContext context)methoderror.toTranslated(context)for localized displayunexpectederror types pass through their message directlyModified Error Classes
New ARB Keys (12)
Buy Errors:
buyUnauthenticatedError,buyBelowMinAmountError,buyAboveMaxAmountErrorbuyInsufficientFundsError,buyOrderNotFoundError,buyOrderAlreadyConfirmedErrorWithdraw Errors:
withdrawUnauthenticatedError,withdrawBelowMinAmountError,withdrawAboveMaxAmountErrorwithdrawOrderNotFoundError,withdrawOrderAlreadyConfirmedErrorNote: Sell and Pay error keys already existed in ARB files.
Validation Results
✅ validate_localizations.py - All 2685 keys synchronized
✅ flutter analyze --fatal-warnings --fatal-infos - No issues found
Testing